From 8a6b8020643ba88117a21d1f1cef155c94a368fa Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Sun, 20 Dec 2020 12:46:01 -0700 Subject: [PATCH] add ozi track write test cases --- reference/track/ozitracks.gpx | 47 +++++++++++++++++++++++++++++ reference/track/ozitracks~gpx-1.plt | 9 ++++++ reference/track/ozitracks~gpx-2.plt | 10 ++++++ reference/track/ozitracks~gpx.plt | 8 +++++ testo.d/ozi.test | 8 +++++ 5 files changed, 82 insertions(+) create mode 100644 reference/track/ozitracks.gpx create mode 100644 reference/track/ozitracks~gpx-1.plt create mode 100644 reference/track/ozitracks~gpx-2.plt create mode 100644 reference/track/ozitracks~gpx.plt diff --git a/reference/track/ozitracks.gpx b/reference/track/ozitracks.gpx new file mode 100644 index 000000000..b4954fe1a --- /dev/null +++ b/reference/track/ozitracks.gpx @@ -0,0 +1,47 @@ + + + + + + track0 + + + + + + + + + + + track1 + + + + + + + + + + + + + + track2 + + + + + + + + + + + + + + + + diff --git a/reference/track/ozitracks~gpx-1.plt b/reference/track/ozitracks~gpx-1.plt new file mode 100644 index 000000000..399cce8f9 --- /dev/null +++ b/reference/track/ozitracks~gpx-1.plt @@ -0,0 +1,9 @@ +OziExplorer Track Point File Version 2.1 +WGS 84 +Altitude is in Feet +Reserved 3 +0,2,255,track1,0,0,2,8421376 +0 +1.000000,2.000000,1,-777.0,40180.1278588,, +1.000010,2.000010,0,-777.0,40180.1278704,, +1.000020,2.000020,0,-777.0,40180.1278819,, diff --git a/reference/track/ozitracks~gpx-2.plt b/reference/track/ozitracks~gpx-2.plt new file mode 100644 index 000000000..21dd10ff4 --- /dev/null +++ b/reference/track/ozitracks~gpx-2.plt @@ -0,0 +1,10 @@ +OziExplorer Track Point File Version 2.1 +WGS 84 +Altitude is in Feet +Reserved 3 +0,2,255,track2,0,0,2,8421376 +0 +2.000000,3.000000,1,-777.0,40180.1278935,, +2.000010,3.000010,0,-777.0,40180.1279051,, +2.000020,3.000020,0,-777.0,40180.1279167,, +2.000030,3.000030,0,-777.0,40180.1279282,, diff --git a/reference/track/ozitracks~gpx.plt b/reference/track/ozitracks~gpx.plt new file mode 100644 index 000000000..08f2c3210 --- /dev/null +++ b/reference/track/ozitracks~gpx.plt @@ -0,0 +1,8 @@ +OziExplorer Track Point File Version 2.1 +WGS 84 +Altitude is in Feet +Reserved 3 +0,2,255,track0,0,0,2,8421376 +0 +0.000000,1.000000,1,-777.0,40180.1278356,, +0.000010,1.000020,0,-777.0,40180.1278472,, diff --git a/testo.d/ozi.test b/testo.d/ozi.test index 986c58ff0..51903441d 100644 --- a/testo.d/ozi.test +++ b/testo.d/ozi.test @@ -17,3 +17,11 @@ compare ${REFERENCE}/track/20070813_short~plt.gpx ${TMPDIR}/20070813_short~plt.g gpsbabel -i ozi -f ${REFERENCE}/track/20070813_short.plt -o ozi -F ${TMPDIR}/20070813_short~plt.plt compare ${REFERENCE}/track/20070813_short~plt.plt ${TMPDIR}/20070813_short~plt.plt +# test ozi tracks with multilple tracks which will be written to separate files +gpsbabel -i gpx -f ${REFERENCE}/track/ozitracks.gpx -o ozi -F ${TMPDIR}/ozitracks~gpx.plt +compare ${REFERENCE}/track/ozitracks~gpx.plt ${TMPDIR}/ozitracks~gpx.plt +compare ${REFERENCE}/track/ozitracks~gpx-1.plt ${TMPDIR}/ozitracks~gpx-1.plt +compare ${REFERENCE}/track/ozitracks~gpx-2.plt ${TMPDIR}/ozitracks~gpx-2.plt + +# test ozi with no output making sure we don't throw an error or segmentation fault. +gpsbabel -i gpx -f ${REFERENCE}/track/ozitracks.gpx -x nuketypes,waypoints,tracks,routes -o ozi -F ${TMPDIR}/empty.plt -- 2.30.2